package ${packages};
${importJavaBean}
import com.kingbook.core.base.BaseService;
import com.kingbook.core.result.JSONPageResult;
import com.kingbook.core.result.JSONResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.*;

/**
 * @Author ${author}
 * @Date ${time}
 * @Version ${version}
 */
@Slf4j
@Service
public class ${javaBeanName}Service extends BaseService {

    @PostConstruct
    private void setNamespace() {
        setNamespace("${javaBeanName}");
    }

    public JSONResult save(Map<String, Object> param) {${setPk}
        return insert("insert", param);
    }
    ${remove}
    public JSONResult modify(Map<String, Object> param) {
        return update("update", param);
    }
    ${find}
    /**
     * 根据条件返回多条记录
     */
    public JSONResult query(Map<String, ?> param) {
        return query("query", param);
    }

    public Map<String, Object>[] queryMap(Map<String, Object> param) {
        return queryMap("query", param);
    }
    ${queryObject}
    /**
     * 根据条件分页查询
     */
    public JSONPageResult queryForPages(Map<String, ?> param) {
        return queryForPages("query", "getRows", param);
    }
    ${queryObjectForPages}

    ${pkMap}
    /* ******以上内容自动生成****** */

}